package com.etcn.modules.statical.base.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.etcn.common.annotation.Manage;
import com.etcn.common.controller.BaseController;
import com.etcn.modules.statical.base.pojo.BaseArea;
import com.etcn.modules.statical.base.service.IBaseAreaService;

/**
 * 地区controller
 * @author guozc
 * @date: 2018-01-12 10:38:06
 */
@Controller
@RequestMapping("/v1/base")
public class BaseAreaController extends BaseController {

	@Autowired
    private IBaseAreaService baseAreaService;
	
    @Manage
    @RequestMapping(value = "areasdir", method = RequestMethod.GET)
    public @ResponseBody Object areasdir(BaseArea baseArea) throws Exception{
    	return baseAreaService.findAreaDir(baseArea);
    }

     /**
     * 根据id查询地区
     */
    @Manage
    @RequestMapping(value = "areas", method = RequestMethod.GET)
    public @ResponseBody Object areas(BaseArea baseArea) throws Exception{
    	return baseAreaService.findList(baseArea);
    }
    
}